<script type="text/javascript" charset="UTF-8">
	$(function() {

		sy.$loginDatagridForm = $('#loginDatagridForm').form();

		sy.$loginDatagridName = $('#loginDatagridName').show().combogrid({
			loadMsg : '数据加载中....',
			panelWidth : 425,
			panelHeight : 180,
			required : true,
			fitColumns : true,
			idField : 'name',
			textField : 'name',
			mode : 'remote',
			url : 'userController.do?loginDatagrid',
			pagination : true,
			pageSize : 5,
			pageList : [ 5, 10 ],
			columns : [ [ {
				field : 'id',
				title : '编号',
				width : 60,
				hidden : true
			}, {
				field : 'name',
				title : '登录名',
				width : 100
			}, {
				field : 'createdatetime',
				title : '创建时间',
				width : 150
			}, {
				field : 'modifydatetime',
				title : '最后修改时间',
				width : 150
			} ] ],
			delay : 500,
			keyHandler : $.extend($.fn.combo.defaults.keyHandler, {
				query : function(q) {
					sy.$loginDatagridName.combogrid('grid').datagrid('load', {
						name : q
					});
				}
			})
		});

		sy.$loginDatagridForm.find('[name=password]').bind('keyup', function(event) {/* 增加回车提交功能 */
			if (event.keyCode == '13') {
				sy.loginFun();
			}
		});

	});
</script>
<form id="loginDatagridForm">
	<table class="tableForm">
		<tr>
			<th style="width: 50px;">登录名</th>
			<td><select id="loginDatagridName" name="name" style="display: none;width:170px;"></select></td>
		</tr>
		<tr>
			<th>密码</th>
			<td><input name="password" type="password" class="easyui-validatebox" required="true" /></td>
		</tr>
	</table>
</form>